home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbtxptr.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89                  dbtxptr
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbtxptr
  6.  
  7.   FUNCTION:
  8.        Return the value of the text pointer for a column in the  current
  9.        row.
  10.  
  11.   SYNTAX:
  12.        DBBINARY *dbtxptr(dbproc, column)
  13.  
  14.        DBPROCESS *dbproc;
  15.        int       column;
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbtxptr                 Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.   COMMENTS:
  28.  
  29.        o Every database column row of type SYBTEXT or  SYBIMAGE  has  an
  30.          associated  text pointer, which uniquely identifies the text or
  31.          image value.  This text pointer is used  by  the  dbwritetext()
  32.          function to update text and image values.
  33.        o It's important that all the rows of the specified text or image
  34.          column  have  valid  text pointers.  A text or image column row
  35.          will have a valid text pointer if it contains  data.   However,
  36.          if the text or image column row contains a null value, its text
  37.          pointer will be valid only if the  null  value  was  explicitly
  38.          entered with the UPDATE statement.
  39.  
  40.          Assume a table textnull with columns key and x, where  x  is  a
  41.          text  column  that  permits  nulls.   The  following  statement
  42.          assigns valid text pointers to the text column's rows:
  43.  
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89                  dbtxptr
  47.   ______________________________________________________________________
  48.             update textnull
  49.             set x = null
  50.  
  51.          On the other hand, the INSERT of  a  null  value  into  a  text
  52.          column does not provide a valid text pointer.  This is true for
  53.          an INSERT of an explicit null or an INSERT of an implicit null,
  54.          such as the following:
  55.  
  56.             insert textnull (key)
  57.             values (2)
  58.  
  59.          When dealing with a null text or image value, be  sure  to  use
  60.          UPDATE to get a valid text pointer.
  61.  
  62.        o For an example  that  uses  dbtxptr(),  see  the  dbwritetext()
  63.          manual page.
  64.  
  65.  
  66.  
  67.  
  68.   dbtxptr                 Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.  
  71.   PARAMETERS:
  72.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  73.            connection for a particular front-end/SQL Server process.  It
  74.            contains all the information that DB-Library uses  to  manage
  75.            communications and data between the front end and SQL Server.
  76.        column -  The number of the column of interest.  The first column
  77.            in a table is number 1.
  78.  
  79.   RETURNS:
  80.        A DBBINARY  pointer  to  the  text  pointer  for  the  column  of
  81.        interest.  This pointer may be NULL.
  82.  
  83.   SEE ALSO:
  84.        dbtxtimestamp, dbwritetext
  85.  
  86.  
  87.  
  88.  
  89.